<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1>我是test.html</h1>
  <script>
    //  js里获取查询参
    document.onclick = function () {
      // js获取查询参？后面的内容
      console.log(location.search); //获取到地址栏？后面的查询参
      // js获取#后面的内容 哈希值
      console.log(location.hash);
    }
  </script>
</body>

</html>